combit List & Label 29 - .NET Help
Programming Introduction / Other Important Concepts / Localization of Project Files in Designer
In This Topic
    Localization of Project Files in Designer
    In This Topic

    So that projects can be used for multilingual teams and in international projects, it is possible in the Designer of List & Label to register languages as well as to translate elements such as tables, fields, variables from the data source and even free texts.

     

     

    Register Languages in Designer

    Different languages can be registered in the Designer, so that project files can be easily localized later. The three languages English, German and French are now registered here and can be easily changed by the user in the menu later in the Designer:

                    
    // Define LCIDs
    int designerLanguageLCIDen = new CultureInfo("en").LCID;
    int designerLanguageLCIDde = new CultureInfo("de").LCID;
    int designerLanguageLCIDfr = new CultureInfo("fr").LCID;
    
    // Add/declare the available design languages
    // according to their respective LCID
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDde);
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDen);
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDfr);
    
                    
    ' Define LCIDs
    Dim designerLanguageLCIDen As Integer = New CultureInfo("en").LCID
    Dim designerLanguageLCIDde As Integer = New CultureInfo("de").LCID
    Dim designerLanguageLCIDfr As Integer = New CultureInfo("fr").LCID
    
    ' Add/declare the available design languages
    ' according to their respective LCID
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDde)
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDen)
    LL.DesignerWorkspace.DesignerLanguages.Add(designerLanguageLCIDfr)
    

     

    Define Translations

    Now the individual translations for each added language must be done and registered.

                                    
    // Clear Dictionary
    LL.Dictionary.Clear();
    
    // The original identifiers are used for English,
    // only the other languages have to be localized
    
    // German localization
    // Localize table names
    LL.Dictionary.Tables.Add("Orders", "Bestellungen", designerLanguageLCIDde);
    
    // Localize relation names
    LL.Dictionary.Relations.Add("Orders2OrderDetails", "Bestellungen/Bestellposten", designerLanguageLCIDde);
    
    // Localize field names
    LL.Dictionary.Identifiers.Add("ProductID", "ProduktID", designerLanguageLCIDde);
    LL.Dictionary.Identifiers.Add("ProductName", "Produktname", designerLanguageLCIDde);
    
    // Localize additional static texts
    LL.Dictionary.StaticTexts.Add("Language", "Deutsch", designerLanguageLCIDde);
    LL.Dictionary.StaticTexts.Add("Summary of Sales by Year", "Verkäufe nach Jahren", designerLanguageLCIDde);
    
    // French localization
    // Localize table names
    LL.Dictionary.Tables.Add("Orders", "Commandes", designerLanguageLCIDfr);
    
    // Localize relation names
    LL.Dictionary.Relations.Add("Orders2OrderDetails", "Commandes2DétailsDesCommandes", designerLanguageLCIDfr);
    
    // Localize field names
    LL.Dictionary.Identifiers.Add("ProductID", "ProduitID", designerLanguageLCIDfr);
    LL.Dictionary.Identifiers.Add("ProductName", "NomDuProduit", designerLanguageLCIDfr);
    
    // Localize additional static texts
    LL.Dictionary.StaticTexts.Add("Language", "Français", designerLanguageLCIDfr);
    LL.Dictionary.StaticTexts.Add("Summary of Sales by Year", "Chiffre d´affaires à année", designerLanguageLCIDfr);
    
                    
    ' Clear Dictionary
    LL.Dictionary.Clear()
    
    ' The original identifiers are used for English,
    ' only the other languages have to be localized
    
    ' German localization
    ' Localize table names
    LL.Dictionary.Tables.Add("Orders", "Bestellungen", designerLanguageLCIDde)
    
    ' Localize relation names
    LL.Dictionary.Relations.Add("Orders2OrderDetails", "Bestellungen/Bestellposten", designerLanguageLCIDde)
    
    ' Localize field names
    LL.Dictionary.Identifiers.Add("ProductID", "ProduktID", designerLanguageLCIDde)
    LL.Dictionary.Identifiers.Add("ProductName", "Produktname", designerLanguageLCIDde)
    
    ' Localize additional static texts
    LL.Dictionary.StaticTexts.Add("Language", "Deutsch", designerLanguageLCIDde)
    LL.Dictionary.StaticTexts.Add("Summary of Sales by Year", "Verkäufe nach Jahren", designerLanguageLCIDde)
    
    ' French localization
    ' Localize table names
    LL.Dictionary.Tables.Add("Orders", "Commandes", designerLanguageLCIDfr)
    
    ' Localize relation names
    LL.Dictionary.Relations.Add("Orders2OrderDetails", "Commandes2DétailsDesCommandes", designerLanguageLCIDfr)
    
    ' Localize field names
    LL.Dictionary.Identifiers.Add("ProductID", "ProduitID", designerLanguageLCIDfr)
    LL.Dictionary.Identifiers.Add("ProductName", "NomDuProduit", designerLanguageLCIDfr)
    
    ' Localize additional static texts
    LL.Dictionary.StaticTexts.Add("Language", "Français", designerLanguageLCIDfr)
    LL.Dictionary.StaticTexts.Add("Summary of Sales by Year", "Chiffre d´affaires à année", designerLanguageLCIDfr)
    

     

    Sample

    A fully functional example that shows the entire localization can be found in the installed Microsoft .NET examples - both in C# and in VB.NET.